import React from 'react'
import {Card, Divider} from "antd";
import Link from "react-router-dom/es/Link";


export default class SerialList extends React.Component {

    serialData = [
        {
            id: '0',
            name: 'Docker微服务'
        }, {
            id: '1',
            name: 'SpringBoot'
        }, {
            id: '2',
            name: 'Netty案例'
        }, {
            id: '3',
            name: 'Java基础'
        }, {
            id: '4',
            name: 'RPC远程服务调用'
        }
    ];

    render() {

        let serialList = [];
        this.serialData.forEach((data) => {
            serialList.push(
                <p key={data.id}><Link key = {data.id} to={'/serial/' + data.id}> {data.name}</Link></p>
            )
        });


        return (
            <div>
                <Card style={{width: 300}}>
                    <Divider>文章专栏</Divider>
                    {serialList}
                </Card>
            </div>
        );
    };
}